﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Demonstartor
{
    class CSVFileReader
    {
        TextReader TR;
        char Separator;

        public CSVFileReader(string FileName, char Separator)
        {
            TR = new StreamReader(FileName, Encoding.UTF8);
            this.Separator = Separator;
        }

        public string[] Read()
        {
            string Cur = TR.ReadLine();
            if (Cur == null)
                return null;
            return Cur.Split(Separator);
        }

        public void Close()
        {
            TR.Close();
        }
    }
}
